app.controller('detail',function($scope,$http,$ionicLoading,$stateParams){
	console.log($stateParams)
	$ionicLoading.show()
	$http.get('/api/v2/products/'+$stateParams.id).then(function(res){
		 if(res){
		 	$ionicLoading.hide()
		 }
		 console.log(res)
		 $scope.detail=res.data
	}).catch(function(err){
		$ionicLoading.show({
			duration:3000,
			template:'获取失败'
		})
	})
})